import { CHANGE_INPUT, CHANGE_LIST, ADD_ITEM, DEL_ITEM } from './homeActiveTypes';
import axios from 'axios';

export const changeInputAction = (value) => ({
    type: CHANGE_INPUT,
    value
})

export const getListAction = (dispatch) => {
    axios.get('./navbarList.json').then((res) => {
        dispatch(changeListAction(res.data))
    })
}

export const changeListAction = (value) => ({
    type: CHANGE_LIST,
    value
})
export const additemAction = (value) => ({
    type: ADD_ITEM,
    value
})
export const delitemAction = (value) => ({
    type: DEL_ITEM,
    value
})
